{% extends "base.html" %}
{% block title %}主题{% endblock %}
{% block head %}
<style type="text/css"></style>
{% endblock %}
{% block content %}

<div class="align-middle col-12 row">
  <h5 class="h2 d-inline">
    <span class="text-muted ">创建主题</span>
  </h5>
</div>
<hr class="border-bottom border-danger" />

<form method="POST" action="{{ url_for('faq.add_category') }}">
  {%for f in form%}
  {%if f.name == 'csrf_token' or f.name == 'submit' %}
  <div class="form-group row">
    <div class="col-sm-4 offset-2">
      {{f}}
    </div>
  </div>
  {%else%}
  <div class="form-group row">
    {{f.label(class='col-sm-2 col-form-label col-form-label-md')}}
    <div class="col-sm-4">

      {{f(rows=10, cols=50)}}


      {% with errors = get_flashed_messages(category_filter=["error"]) %}
      {% if errors %}
      {% for msg in errors %}
      <div class="alert alert-danger alert-dismissible fade show mt-3" role="alert">
        <strong>{{ msg }}</strong>
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      {% endfor %}
      {% endif %}
      {% endwith %}
    </div>
    {{f.label(class='col-sm-2 col-form-label col-form-label-md')}}
  </div>
  {%endif%}
  {%endfor%}
</form>



<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter">
  Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
  aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalCenterTitle">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <h5>Popover in a modal</h5>
        <p>This <a href="#" role="button" class="btn btn-secondary popover-test" title="Popover title"
            data-content="Popover body content is set in this attribute.">button</a> triggers a popover on click.
        </p>
        <hr>
        <h5>Tooltips in a modal</h5>
        <p><a href="#" class="tooltip-test" title="Tooltip">This link</a> and <a href="#" class="tooltip-test"
            title="Tooltip">that link</a> have tooltips on hover.</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

{% endblock %}